<?php
require_once("nusoap-0.9.5/lib/nusoap.php");

function getProd($category) {
	if ($category == "books") {
		return join(",", array(
            "The WordPress Anthology",
            "PHP Master: Write Cutting Edge Code",
            "Build Your Own Website the Right Way"));
	}
	else {
		return "No products listed under that category";
	}
}

$server = new soap_server();
$server->register("getProd");

$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);

?>